package me.zhanshi123.anger

import org.bukkit.configuration.file.FileConfiguration
import org.bukkit.configuration.file.YamlConfiguration
import java.io.File

class ConfigManager {
    var config: FileConfiguration
    var file: File = File(AngerInstance.instance.dataFolder, "config.yml")

    constructor() {
        if (!file.exists()) {
            AngerInstance.instance.saveResource("config.yml", false)
        }
        config = YamlConfiguration.loadConfiguration(file)
    }

    fun getCommands(): List<String> {
        return config.getStringList("Commands")
    }
}